<!-- 游戏详情 -->
<template>
  <!-- 老虎机(Slots) -->
  <Tiger :show="props.show && props.checkedItem.game_type == 1" :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />

  <!-- 百人场(飞机) -->
  <Aircraft :show="props.show && props.checkedItem.game_type == 2 && props.checkedItem.game_id == 100001" :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />
  <!-- 百人(Luck49)\(大逃杀) -->
  <Luck :show="props.show && props.checkedItem.game_type == 2 && (props.checkedItem.game_id == 100002 || props.checkedItem.game_id == 100003)" :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />
  <!-- 百人场(千倍合约) -->
  <Thousand :show="props.show && props.checkedItem.game_type == 2 && props.checkedItem.game_id == 100005" :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />

  <!-- 街机(扫雷) -->
  <Sweep :show="props.show && props.checkedItem.game_type == 4 && props.checkedItem.game_id == 9" :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />
  
  <!-- MineGame -->
  <MineGame :show="(props.show && selectToLabel(indexStore.gameArray,props.checkedItem.game_id,'game_source','value'))?true:false" :checkedItem="props.checkedItem" @onHideDetails="onHideDetails" />
</template>
<script lang="ts" setup>
import { selectToLabel } from '@/utils/index'
import Aircraft from '@/views/player/components/gameDetails/aircraft.vue'
import Sweep from '@/views/player/components/gameDetails/sweep.vue'
import Tiger from '@/views/player/components/gameDetails/tiger.vue'
import Luck from '@/views/player/components/gameDetails/luck.vue'
import Thousand from '@/views/player/components/gameDetails/thousand.vue'
import MineGame from '@/views/player/components/gameDetails/mineGame.vue'

import { useStore } from '@/stores/index'
const indexStore = useStore()

const props = defineProps({
  show: {
    type: Boolean,
    default: () => {
      return false
    }
  },
  checkedItem: {
    type: Object,
    default: () => {
      return {}
    }
  }
})

// 重置
const emit = defineEmits(['onHideDetails'])
const onHideDetails = () => {
  emit('onHideDetails', false)
}
</script>

<style scoped lang="scss"></style>
